﻿#pragma strict
var column : GameObject;

function Start(){
	var positionObjectX : float = gameObject.transform.position.x;
	var scaleDown : float = randomScale();
	var positionColumnDown : Vector2 =  Vector2(positionObjectX,(scaleDown/2) + 0.5);
	var columnDown : GameObject = Instantiate(column, positionColumnDown, transform.rotation);
	columnDown.transform.localScale.y = scaleDown;
	var scaleUp : float = 10 - scaleDown - 2; 
	var positionColumnUp : Vector2 = Vector2(positionObjectX, scaleDown + 2 + (scaleUp/2) + 0.5);
	var columnUp : GameObject = Instantiate(column,positionColumnUp, transform.rotation);
	columnUp.transform.localScale.y = scaleUp;
}

function randomScale() : float{
	var randomScale : float = Random.Range(3,5);
	return randomScale;
}